//
//  PayViewModel.m
//  didacar
//
//  Created by imac on 16/3/17.
//  Copyright © 2016年 dzmmac. All rights reserved.
//

#import "PayViewModel.h"

@implementation PayViewModel

/**
 *  获取支付信息
 *
 *  @param resultBlock
 */
-(void)getPayMsg:(DealDataResultBlock)resultBlock{

    NSMutableDictionary *postDic = [[NSMutableDictionary alloc ] init];
    [postDic setObj:USERINFOManager.getUserInfo.MemberId forKey:@"MemberId"];
    [postDic setObj:self.OrderNumber forKey:@"OrderNumber"];
    [postDic setObj:@(self.PayChannel).stringValue forKey:@"PayChannel"];
    [postDic setObj:@"2" forKey:@"Plat"];
    
    WEAKSELF
    [[BaseHttpRequest sharedInstance] sendRequestToPost:@"Pay.PayAction" withData:postDic alertMessage:@"" success:^(NSDictionary *dicData) {
        weakSelf.responseDic = dicData;
        
        resultBlock(1,nil,nil);
    } error:^(NSString *errorMsg) {
        resultBlock(0,nil,errorMsg);
    }];
}



@end
